<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>


<link rel="stylesheet" href="__PUBLIC__/kindeditor/themes/default/default.css" />
<script src="__PUBLIC__/kindeditor/kindeditor-min.js"></script>
<script src="__PUBLIC__/kindeditor/lang/zh_CN.js"></script>
<script src="__PUBLIC__/jquery.js"></script>
<script>
	KindEditor.ready(function(K) {
				var editor = K.editor({
					allowFileManager : true,
					uploadJson : '__APP__/Upload/index/',
				});
				K('.upbnt').click(function() {
					editor.loadPlugin('image', function() {
						editor.plugin.imageDialog({
							showRemote : false,
							clickFn : function(url, title, width, height, border, align) {
								K('#imgurl').val(url);
								editor.hideDialog();
							}
						});
					});
				});
				
				
				
				var editor1 = K.editor({
					allowFileManager : true,
					fileManagerJson : '__APP__/Upload/filemanager'
				});
				K('#button2').click(function() {
					editor1.loadPlugin('filemanager', function() {
						editor1.plugin.filemanagerDialog({
							viewType : 'VIEW',
							dirName : 'image',
							clickFn : function(url, title) {
								K('#imgurl2').val(url);
								editor.hideDialog();
							}
						});
					});
				});
				
				
				var editor2 = K.editor({
					allowFileManager : true,
					uploadJson : '__APP__/Upload/index/',
				});
				K('#button3').click(function() {
					editor2.loadPlugin('multiimage', function() {
						editor2.plugin.multiImageDialog({
							clickFn : function(urlList) {
								var div = K('#J_imageView');
								div.html('');
								K.each(urlList, function(i, data) {
									div.append('<img src="' + data.url + '" width=200 height=200 />');
								});
								editor2.hideDialog();
							}
						});
					});
				});
				
				
				
				
				
			});
</script>


</head>

<body>
<p>上传本地图片</p>
<div>
<input type="text" id="imgurl" name=""  class="fileurl" readonly />
<input type="button" id="upload" value="Upload"  class="upbnt"/>
</div>
<br><br>

<p>浏览服务器图片</p>
<div>
<input type="text" id="imgurl2" name=""  class="fileurl" readonly />
<input type="button" id="button2" value="ShowImage" />
</div>

<br><br>
<p>批量上传图片</p>
<div>
<input type="button" id="button3" value="Upload" />
<div id="J_imageView" ></div>
</div>


</body>
</html>
